package org.jeecg.modules.labourwork.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.labourwork.dao.WorkOrderMapper;
import org.jeecg.modules.labourwork.entity.WorkOrder;
import org.jeecg.modules.labourwork.service.WorkOrderService;
import org.jeecg.modules.labourwork.vo.WorkingOrderVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder> implements WorkOrderService {

    @Resource
    private WorkOrderMapper mapper;

    @Override
    public IPage<WorkOrder> findWorkOrderAll(Page page, WorkOrder workOrder) {

        return page.setRecords(mapper.selWorkOrderAll(workOrder,page));
    }

    @Override
    public int findWorkOrderCount(WorkOrder workOrder) {

        return mapper.selworkOrderCount(workOrder);
    }


    //工程工单
    @Override
    public IPage<WorkingOrderVo> findWrok(Page page, WorkingOrderVo workingOrderVo) {
        return page.setRecords(mapper.findWrok(page,workingOrderVo));
    }
    @Override
    public int countWork(WorkingOrderVo workingOrderVo) {
        return mapper.countWork(workingOrderVo);
    }
}
